
extends public_menu
block person_menu_content
        if(!collects || collects.length==0)
            div.text-center 你还没有发布任何#{isRecipe?'菜谱':'菜单'}哦~
        else
            mixin item(collect)
                div.wrapper
                    if(isRecipe)
                        a(href="/recipe/details/#{collect.id}", alt="#{collect.title}" target="_blank")
                            img(src="#{collect.image || '/images/menu_default.jpg'}", alt="#{collect.title}")
                    else
                        a(href="/menu/detail/#{collect.id}", alt="#{collect.title}" target="_blank")
                            img(src="#{collect.image || '/images/menu_default.jpg'}", alt="#{collect.title}")
                    p.title #{collect.title}
                    div.bottom-panel
                        span.left #{dateformat(collect.createOn)}
                        div.inline.right
                            span.glyphicon.glyphicon-heart
                            |  #{collect.upvote}
                            span.glyphicon.glyphicon-comment
                            |  #{collect.comment}
            mixin panel(index)
                if(index < collects.length)
                    if(index % 4 === 0)
                        div.item-panel
                            + item(collects[index])
                        + panel(index + 4)
                    else
                        div.item-panel(style="margin-left:8px")
                            + item(collects[index])
                        + panel(index + 4)

            - var quality = collects.length > 4 ? 4 : collects.length
            - for(var i=0; i<quality; i++){
                div(style='display:block;float:left;width:274px')
                    + panel(i)
            - }
        div.clearfix
